package com.作业.Day1;


import com.homwork.Bean.Receipts;
import com.homwork.Bean.Shopping_cart;

import java.util.ArrayList;

public class Homework3 {
    public static void main(String[] args) {

        /**
         * 打印购物小票
         */
        Shopping_cart shop1 = Shopping_cart.builder()
                .unit_price(245)
                .Shop_name("T恤")
                .number(2)
                .build();
        Shopping_cart shop2 = Shopping_cart.builder()
                .unit_price(570)
                .Shop_name("网球鞋")
                .number(1)
                .build();
        Shopping_cart shop3 = Shopping_cart.builder()
                .unit_price(320)
                .Shop_name("网球拍")
                .number(1)
                .build();

        ArrayList list= new ArrayList<>();
        list.add(shop1);
        list.add(shop2);
        list.add(shop3);

        Receipts build = Receipts.builder()
                .list(list).build();
        build.Shop1();

        System.out.println( build.toString());
    }


}